package contest.sweek199;

/**
 * 1528. 重新排列字符串
 * @author code_yc
 * @version 1.0
 * @date 2020/7/26 8:22
 */
public class Solution1 {

    public String restoreString(String s, int[] indices) {
        char[] t = new char[s.length()];
        char[] p = s.toCharArray();
        for (int i = 0; i < indices.length; i++) {
            t[indices[i]] = p[i];
        }
        return String.valueOf(t);
    }
}
